package com.accp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.accp.dao.OrderInfoMapper;
import com.accp.pojo.Goods;
import com.accp.pojo.Income;
import com.accp.pojo.OrderInfo;
import com.accp.pojo.Room;
import com.accp.pojo.RoomType;
import com.accp.pojo.Vip;
import com.accp.service.OrderInfoService;
@Service("orderInfoService")
public class OrderInfoServiceImpl implements OrderInfoService {

	@Autowired
	private OrderInfoMapper orderInfoMapper;
	@Override
	public List<OrderInfo> getAllOrder(Integer roomTypeId, Integer jiezhang,
			String beginTime, String overTime, Integer roomNum, String user) {
		// TODO Auto-generated method stub
		 
		return orderInfoMapper.getAllOrder(roomTypeId, jiezhang, beginTime, overTime, roomNum, user);
	}
	@Override
	public List<RoomType> getRoomType() {
		// TODO Auto-generated method stub
		return orderInfoMapper.getRoomType();
	}
	@Override
	public OrderInfo getByOrderId(int id) {
		// TODO Auto-generated method stub
		return orderInfoMapper.getByOrderId(id);
	}
	@Override
	public Income getIncomeByOrderId(Integer id) {
		// TODO Auto-generated method stub
		return orderInfoMapper.getIncomeByOrderId(id);
	}
	@Override
	public List<Goods> getAllGoods() {
		// TODO Auto-generated method stub
		return orderInfoMapper.getAllGoods();
	}
	@Override
	public List<Room> getallroom() {
		// TODO Auto-generated method stub
		return orderInfoMapper.getallroom();
	}
	@Override
	public void jiesuanorder(Integer oid) {
		// TODO Auto-generated method stub
		this.orderInfoMapper.jiesuanorder(oid);
		System.out.println("执行结算order");
		
	}
	@Override
	public void jeisuanroom(Integer roomid) {
		// TODO Auto-generated method stub
		this.orderInfoMapper.jeisuanroom(roomid);
		
	}
	@Override
	public void addincome(int oid, double money) {
		// TODO Auto-generated method stub
		this.orderInfoMapper.addincome(oid, money);
		
	}
	@Override
	public void addGoods(int oid, Integer[] gods) {
		// TODO Auto-generated method stub
		this.orderInfoMapper.addGoods(oid, gods);
		
	}
	@Override
	public List<Vip> getVipAll() {
		// TODO Auto-generated method stub
		return orderInfoMapper.getVipAll();
	}
	@Override
	public void openroom(Integer roomid) {
		this.orderInfoMapper.openroom(roomid);
		
	}
	@Override
	public void neworder(Integer orderid, String cardnum, Integer roomid) {
		// TODO Auto-generated method stub
		
		this.orderInfoMapper.neworder(orderid, cardnum, roomid);
		
	}
	@Override
	public void newResidents(String cardnum, Integer vipid, String name) {
		// TODO Auto-generated method stub
		this.orderInfoMapper.newResidents(cardnum, vipid, name);
	}
	@Override
	public int quertmanifexi(String cardnum) {
		// TODO Auto-generated method stub
		return orderInfoMapper.quertmanifexi(cardnum);
	}
	

}
